home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.42 / includes3v1 / includes3v1.lha / Libraries / GadTools.i < prev    next >
Text File  |  1994-12-04  |  19KB  |  501 lines

  1. { GadTools.i }
  2.  
  3. {------------------------------------------------------------------------}
  4.  
  5. {$I   "Include:Exec/Types.i"}
  6. {$I   "Include:Utility/TagItem.i"}
  7. {$I   "Include:Intuition/Intuition.i"}
  8. {$I   "Include:Graphics/Text.i"}
  9. {$I   "Include:Graphics/Gfx.i"}
  10. {$I   "Include:Graphics/RastPort.i"}
  11.  
  12. {------------------------------------------------------------------------}
  13.  
  14. VAR GadToolsBase : Address;
  15.  
  16. {  The kinds (almost classes) of gadgets in the toolkit.  Use these
  17.     identifiers when calling CreateGadgetA() }
  18.  
  19. CONST
  20.  GENERIC_KIND  =  0;
  21.  BUTTON_KIND   =  1;
  22.  CHECKBOX_KIND =  2;
  23.  INTEGER_KIND  =  3;
  24.  LISTVIEW_KIND =  4;
  25.  MX_KIND       =  5;
  26.  NUMBER_KIND   =  6;
  27.  CYCLE_KIND    =  7;
  28.  PALETTE_KIND  =  8;
  29.  SCROLLER_KIND =  9;
  30. { Kind number 10 is reserved }
  31.  SLIDER_KIND   =  11;
  32.  STRING_KIND   =  12;
  33.  TEXT_KIND     =  13;
  34.  
  35.  NUM_KINDS     =  14;
  36.  
  37.  
  38. {------------------------------------------------------------------------}
  39.  
  40. {  'Or' the appropriate set together for your Window IDCMPFlags: }
  41.  
  42.  ARROWIDCMP    =  (IDCMP_GADGETUP + IDCMP_GADGETDOWN +
  43.                    IDCMP_INTUITICKS + IDCMP_MOUSEBUTTONS);
  44.  
  45.  BUTTONIDCMP   =  (IDCMP_GADGETUP);
  46.  CHECKBOXIDCMP =  (IDCMP_GADGETUP);
  47.  INTEGERIDCMP  =  (IDCMP_GADGETUP);
  48.  LISTVIEWIDCMP =  (IDCMP_GADGETUP + IDCMP_GADGETDOWN +
  49.                    IDCMP_MOUSEMOVE + ARROWIDCMP);
  50.  
  51.  MXIDCMP       =  (IDCMP_GADGETDOWN);
  52.  NUMBERIDCMP   =  0;
  53.  CYCLEIDCMP    =  (IDCMP_GADGETUP);
  54.  PALETTEIDCMP  =  (IDCMP_GADGETUP);
  55.  
  56. {  Use ARROWIDCMP+SCROLLERIDCMP if your scrollers have arrows: }
  57.  SCROLLERIDCMP =  (IDCMP_GADGETUP + IDCMP_GADGETDOWN + IDCMP_MOUSEMOVE);
  58.  SLIDERIDCMP   =  (IDCMP_GADGETUP + IDCMP_GADGETDOWN + IDCMP_MOUSEMOVE);
  59.  STRINGIDCMP   =  (IDCMP_GADGETUP);
  60.  
  61.  TEXTIDCMP     =  0;
  62.  
  63.  
  64. {------------------------------------------------------------------------}
  65.  
  66. {  Generic NewGadget used by several of the gadget classes: }
  67.  
  68. Type
  69.    NewGadget = Record
  70.     ng_LeftEdge, ng_TopEdge : Short;       {  gadget position }
  71.     ng_Width, ng_Height     : Short;       {  gadget size }
  72.     ng_GadgetText           : String;      {  gadget label }
  73.     ng_TextAttr             : TextAttrPtr; {  desired font for gadget label }
  74.     ng_GadgetID             : Short;       {  gadget ID }
  75.     ng_Flags                : Integer;     {  see below }
  76.     ng_VisualInfo           : Address;     {  Set to retval of GetVisualInfo() }
  77.     ng_UserData             : Address;     {  gadget UserData }
  78.    END;
  79.    NewGadgetPtr = ^NewGadget;
  80.  
  81.  
  82. {  ng_Flags control certain aspects of the gadget.  The first five control
  83.     the placement of the descriptive text.  All larger groups supply a
  84.     default: }
  85.  
  86. CONST
  87.  PLACETEXT_LEFT  = $0001;  { Right-align text on left side }
  88.  PLACETEXT_RIGHT = $0002;  { Left-align text on right side }
  89.  PLACETEXT_ABOVE = $0004;  { Center text above }
  90.  PLACETEXT_BELOW = $0008;  { Center text below }
  91.  PLACETEXT_IN    = $0010;  { Center text on }
  92.  
  93.  NG_HIGHLABEL    = $0020;  { Highlight the label }
  94.  
  95. {------------------------------------------------------------------------}
  96.  
  97. { Fill out an array of these and pass that to CreateMenus(): }
  98.  
  99. Type
  100.    NewMenu = Record
  101.     nm_Type           : Byte;              {  See below }
  102.     nm_Label          : String;            {  Menu's label }
  103.     nm_CommKey        : String;            {  MenuItem Command Key Equiv }
  104.     nm_Flags          : Short;             {  Menu OR MenuItem flags (see note) }
  105.     nm_MutualExclude  : Integer;           {  MenuItem MutualExclude word }
  106.     nm_UserData       : Address;           {  For your own use, see note }
  107.    END;
  108.    NewMenuPtr = ^NewMenu;
  109.  
  110. const
  111. { Needed only by inside IM_ definitions below }
  112.  MENU_IMAGE     = 128;
  113.  
  114. { nm_Type determines what each NewMenu structure corresponds to.
  115.  * for the NM_TITLE, NM_ITEM, and NM_SUB values, nm_Label should
  116.  * be a text string to use for that menu title, item, or sub-item.
  117.  * For IM_ITEM or IM_SUB, set nm_Label to point at the Image structure
  118.  * you wish to use for this item or sub-item.
  119.  * NOTE: At present, you may only use conventional images.
  120.  * Custom images created from Intuition image-classes do not work.
  121.  }
  122.  NM_TITLE      =  1;       { Menu header }
  123.  NM_ITEM       =  2;       { Textual menu item }
  124.  NM_SUB        =  3;       { Textual menu sub-item }
  125.  
  126.  IM_ITEM       =  (NM_ITEM OR MENU_IMAGE);    { Graphical menu item }
  127.  IM_SUB        =  (NM_SUB OR MENU_IMAGE);     { Graphical menu sub-item }
  128.  
  129. { The NewMenu array should be terminated with a NewMenu whose
  130.  * nm_Type equals NM_END.
  131.  }
  132.  NM_END        =  0;       { End of NewMenu array }
  133.  
  134. { Starting with V39, GadTools will skip any NewMenu entries whose
  135.  * nm_Type field has the NM_IGNORE bit set.
  136.  }
  137.  NM_IGNORE     =  64;
  138.  
  139.  
  140. { nm_Label should be a text string for textual items, a pointer
  141.  * to an Image structure for graphical menu items, or the special
  142.  * constant NM_BARLABEL, to get a separator bar.
  143.  }
  144.  NM_BARLABEL   = -1;
  145.  
  146. { The nm_Flags field is used to fill out either the Menu->Flags or
  147.  * MenuItem->Flags field.  Note that the sense of the MENUENABLED or
  148.  * ITEMENABLED bit is inverted between this use and Intuition's use,
  149.  * in other words, NewMenus are enabled by default.  The following
  150.  * labels are provided to disable them:
  151.  }
  152.  NM_MENUDISABLED = MENUENABLED;
  153.  NM_ITEMDISABLED = ITEMENABLED;
  154.  
  155. { New for V39:  NM_COMMANDSTRING.  For a textual MenuItem or SubItem,
  156.  * point nm_CommKey at an arbitrary string, and set the NM_COMMANDSTRING
  157.  * flag.
  158.  }
  159.  NM_COMMANDSTRING = COMMSEQ;
  160.  
  161. { The following are pre-cleared (COMMSEQ, ITEMTEXT, and HIGHxxx are set
  162.  * later as appropriate):
  163.  * Under V39, the COMMSEQ flag bit is not cleared, since it now has
  164.  * meaning.
  165.  }
  166.  NM_FLAGMASK    = NOT (COMMSEQ OR ITEMTEXT OR HIGHFLAGS);
  167.  NM_FLAGMASK_V39 = NOT (ITEMTEXT OR HIGHFLAGS);
  168.  
  169. { You may choose among CHECKIT, MENUTOGGLE, and CHECKED.
  170.  * Toggle-select menuitems are of type CHECKIT|MENUTOGGLE, along
  171.  * with CHECKED if currently selected.  Mutually exclusive ones
  172.  * are of type CHECKIT, and possibly CHECKED too.  The nm_MutualExclude
  173.  * is a bit-wise representation of the items excluded by this one,
  174.  * so in the simplest case (choose 1 among n), these flags would be
  175.  * ~1, ~2, ~4, ~8, ~16, etc.  See the Intuition Menus chapter.
  176.  }
  177.  
  178. { A UserData pointer can be associated with each Menu and MenuItem structure.
  179.  * The CreateMenus() call allocates space for a UserData after each
  180.  * Menu or MenuItem (header, item or sub-item).  You should use the
  181.  * GTMENU_USERDATA() or GTMENUITEM_USERDATA() macro to extract it.
  182.  }
  183.  
  184. FUNCTION GTMENU_USERDATA(m : MenuPtr) : Integer;
  185.  External;
  186.  
  187. FUNCTION GTMENUITEM_USERDATA(mi : MenuItemPtr) : Integer;
  188.  External;
  189.  
  190. const
  191. { These return codes can be obtained through the GTMN_SecondaryError tag }
  192.  GTMENU_TRIMMED = $00000001;      { Too many menus, items, or subitems,
  193.                                          * menu has been trimmed down
  194.                                          }
  195.  GTMENU_INVALID = $00000002;      { Invalid NewMenu array }
  196.  GTMENU_NOMEM   = $00000003;      { Out of memory }
  197.  
  198. {------------------------------------------------------------------------}
  199.  
  200. { Starting with V39, checkboxes and mx gadgets can be scaled to your
  201.  * specified gadget width/height.  Use the new GTCB_Scaled or GTMX_Scaled
  202.  * tags, respectively.  Under V37, and by default in V39, the imagery
  203.  * is of the following fixed size:
  204.  }
  205.  
  206. { MX gadget default dimensions: }
  207.  MX_WIDTH      =  17;
  208.  MX_HEIGHT     =  9;
  209.  
  210. { Checkbox default dimensions: }
  211.  CHECKBOX_WIDTH  = 26;
  212.  CHECKBOX_HEIGHT = 11;
  213.  
  214. {------------------------------------------------------------------------}
  215.  
  216.  
  217. {------------------------------------------------------------------------}
  218.  
  219. {  Tags for GadTools functions: }
  220. CONST
  221.  GT_TagBase        =   TAG_USER + $80000;
  222.  
  223.  GTVI_NewWindow    =   GT_TagBase+1;  { Unused }
  224.  GTVI_NWTags       =   GT_TagBase+2;  { Unused }
  225.  
  226.  GT_Private0       =   GT_TagBase+3;  { (private) }
  227.  
  228.  GTCB_Checked      =   GT_TagBase+4;  { State of checkbox }
  229.  
  230.  GTLV_Top          =   GT_TagBase+5;  { Top visible one in listview }
  231.  GTLV_Labels       =   GT_TagBase+6;  { List to display in listview }
  232.  GTLV_ReadOnly     =   GT_TagBase+7;  { TRUE IF listview is to be
  233.                                               read-only }
  234.  GTLV_ScrollWidth  =   GT_TagBase+8;  { Width of scrollbar }
  235.  
  236.  GTMX_Labels       =   GT_TagBase+9;  { NULL-terminated array of labels }
  237.  GTMX_Active       =   GT_TagBase+10; { Active one in mx gadget }
  238.  
  239.  GTTX_Text         =   GT_TagBase+11; { Text to display }
  240.  GTTX_CopyText     =   GT_TagBase+12; { Copy text label instead of
  241.                                               referencing it }
  242.  
  243.  GTNM_Number       =   GT_TagBase+13; { Number to display }
  244.  
  245.  GTCY_Labels       =   GT_TagBase+14; { NULL-terminated array of labels }
  246.  GTCY_Active       =   GT_TagBase+15; { The active one in the cycle gad }
  247.  
  248.  GTPA_Depth        =   GT_TagBase+16; { Number of bitplanes in palette }
  249.  GTPA_Color        =   GT_TagBase+17; { Palette color }
  250.  GTPA_ColorOffset  =   GT_TagBase+18; { First color to use in palette }
  251.  GTPA_IndicatorWidth = GT_TagBase+19; { Width of current-color indicator }
  252.  GTPA_IndicatorHeight = GT_TagBase+20; { Height of current-color indicator }
  253.  
  254.  GTSC_Top          =   GT_TagBase+21; { Top visible in scroller }
  255.  GTSC_Total        =   GT_TagBase+22; { Total in scroller area }
  256.  GTSC_Visible      =   GT_TagBase+23; { Number visible in scroller }
  257.  GTSC_Overlap      =   GT_TagBase+24; { Unused }
  258.  
  259. {  GT_TagBase+25 through GT_TagBase+37 are reserved }
  260.  
  261.  GTSL_Min          =   GT_TagBase+38; { Slider min value }
  262.  GTSL_Max          =   GT_TagBase+39; { Slider max value }
  263.  GTSL_Level        =   GT_TagBase+40; { Slider level }
  264.  GTSL_MaxLevelLen  =   GT_TagBase+41; { Max length of printed level }
  265.  GTSL_LevelFormat  =   GT_TagBase+42; { Format string for level }
  266.  GTSL_LevelPlace   =   GT_TagBase+43; { Where level should be placed }
  267.  GTSL_DispFunc     =   GT_TagBase+44; { Callback for number calculation
  268.                                               before display }
  269.  
  270.  GTST_String       =   GT_TagBase+45; { String gadget's displayed string }
  271.  GTST_MaxChars     =   GT_TagBase+46; { Max length of string }
  272.  
  273.  GTIN_Number       =   GT_TagBase+47; { Number in integer gadget }
  274.  GTIN_MaxChars     =   GT_TagBase+48; { Max number of digits }
  275.  
  276.  GTMN_TextAttr     =   GT_TagBase+49; { MenuItem font TextAttr }
  277.  GTMN_FrontPen     =   GT_TagBase+50; { MenuItem text pen color }
  278.  
  279.  GTBB_Recessed     =   GT_TagBase+51; { Make BevelBox recessed }
  280.  
  281.  GT_VisualInfo     =   GT_TagBase+52; { result of VisualInfo call }
  282.  
  283.  GTLV_ShowSelected =   GT_TagBase+53; { show selected entry beneath
  284.                 listview, set tag data = NULL for display-only, or pointer
  285.                 to a string gadget you've created }
  286.  GTLV_Selected     =   GT_TagBase+54; { Set ordinal number of selected
  287.                                               entry in the list }
  288.  GT_Reserved0      =   GT_TagBase+55; { Reserved }
  289.  GT_Reserved1      =   GT_TagBase+56; { Reserved for future use }
  290.  
  291.  GTTX_Border       =   GT_TagBase+57; { Put a border around
  292.                                               Text-display gadgets }
  293.  GTNM_Border       =   GT_TagBase+58; { Put a border around
  294.                                               Number-display gadgets }
  295.  
  296.  GTSC_Arrows       =   GT_TagBase+59; { Specify size of arrows for
  297.                                               scroller }
  298.  
  299.  GTMN_Menu         =   GT_TagBase+60; { Pointer to Menu for use by
  300.                                               LayoutMenuItems() }
  301.  GTMX_Spacing      =   GT_TagBase+61; { Added to font height to
  302.                 figure spacing between mx choices.  Use this instead
  303.                 of LAYOUTA_SPACING for mx gadgets. }
  304.  
  305. { New to V37 GadTools.  Ignored by GadTools V36 }
  306.  GTMN_FullMenu     =   GT_TagBase+62; { Asks CreateMenus() to
  307.                 validate that this is a complete menu structure }
  308.  GTMN_SecondaryError =  GT_TagBase+63; { ti_Data is a pointer
  309.                 to a ULONG to receive error reports from CreateMenus() }
  310.  GT_Underscore     =   GT_TagBase+64; { ti_Data points to the symbol
  311.                 that preceeds the character you'd like to underline in a
  312.                 gadget label }
  313.  
  314. { New to V39 GadTools.  Ignored by GadTools V36 and V37 }
  315.  GTMN_Checkmark     =  GT_TagBase+65; { ti_Data is checkmark img to use }
  316.  GTMN_AmigaKey      =  GT_TagBase+66; { ti_Data is Amiga-key img to use }
  317.  GTMN_NewLookMenus  =  GT_TagBase+67; { ti_Data is boolean }
  318.  
  319. { New to V39 GadTools.  Ignored by GadTools V36 and V37.
  320.  * Set to TRUE if you want the checkbox or mx image scaled to
  321.  * the gadget width/height you specify.  Defaults to FALSE,
  322.  * for compatibility.
  323.  }
  324.  GTCB_Scaled         = GT_TagBase+68; { ti_Data is boolean }
  325.  GTMX_Scaled         = GT_TagBase+69; { ti_Data is boolean }
  326.  
  327.  GTPA_NumColors      = GT_TagBase+70; { Number of colors in palette }
  328.  
  329.  GTMX_TitlePlace     = GT_TagBase+71; { Where to put the title }
  330.  
  331.  GTTX_FrontPen       = GT_TagBase+72; { Text color in TEXT_KIND gad }
  332.  GTTX_BackPen        = GT_TagBase+73; { Bgrnd color in TEXT_KIND gad }
  333.  GTTX_Justification  = GT_TagBase+74; { See GTJ_#? constants }
  334.  
  335.  GTNM_FrontPen       = GT_TagBase+72; { Text color in NUMBER_KIND gad }
  336.  GTNM_BackPen        = GT_TagBase+73; { Bgrnd color in NUMBER_KIND gad }
  337.  GTNM_Justification  = GT_TagBase+74; { See GTJ_#? constants }
  338.  GTNM_Format         = GT_TagBase+75; { Formatting string for number }
  339.  GTNM_MaxNumberLen   = GT_TagBase+76; { Maximum length of number }
  340.  
  341.  GTBB_FrameType      = GT_TagBase+77; { defines what kind of boxes
  342.                                             * DrawBevelBox() renders. See
  343.                                             * the BBFT_#? constants for
  344.                                             * possible values
  345.                                             }
  346.  
  347.  GTLV_MakeVisible    = GT_TagBase+78; { Make this item visible }
  348.  GTLV_ItemHeight     = GT_TagBase+79; { Height of an individual item }
  349.  
  350.  GTSL_MaxPixelLen    = GT_TagBase+80; { Max pixel size of level display }
  351.  GTSL_Justification  = GT_TagBase+81; { how should the level be displayed }
  352.  
  353.  GTPA_ColorTable     = GT_TagBase+82; { colors to use in palette }
  354.  
  355.  GTLV_CallBack       = GT_TagBase+83; { general-purpose listview call back }
  356.  GTLV_MaxPen         = GT_TagBase+84; { maximum pen number used by call back }
  357.  
  358.  GTTX_Clipped        = GT_TagBase+85; { make a TEXT_KIND clip text }
  359.  GTNM_Clipped        = GT_TagBase+85; { make a NUMBER_KIND clip text }
  360.  
  361.  
  362. {------------------------------------------------------------------------}
  363.  
  364. { Justification types for GTTX_Justification and GTNM_Justification tags }
  365.  GTJ_LEFT   = 0;
  366.  GTJ_RIGHT  = 1;
  367.  GTJ_CENTER = 2;
  368.  
  369. {------------------------------------------------------------------------}
  370.  
  371. { Bevel box frame types for GTBB_FrameType tag }
  372.  BBFT_BUTTON      = 1;  { Standard button gadget box }
  373.  BBFT_RIDGE       = 2;  { Standard string gadget box }
  374.  BBFT_ICONDROPBOX = 3;  { Standard icon drop box     }
  375.  
  376. {------------------------------------------------------------------------}
  377.  
  378. { Typical suggested spacing between "elements": }
  379.  INTERWIDTH    =  8;
  380.  INTERHEIGHT   =  4;
  381.  
  382. {------------------------------------------------------------------------}
  383.  
  384.  
  385. {  "NWay" is an old synonym for cycle gadgets }
  386.  NWAY_KIND    =   CYCLE_KIND;
  387.  NWAYIDCMP    =   CYCLEIDCMP;
  388.  GTNW_Labels  =   GTCY_Labels;
  389.  GTNW_Active  =   GTCY_Active;
  390.  
  391. {------------------------------------------------------------------------}
  392.  
  393. { These two definitions are obsolete, but are here for backwards
  394.  * compatibility.  You never need to worry about these:
  395.  }
  396.  GADTOOLBIT    =  ($8000);
  397. { Use this mask to isolate the user part: }
  398.  GADTOOLMASK   =  NOT (GADTOOLBIT);
  399.  
  400. {------------------------------------------------------------------------}
  401.  
  402. { These definitions are for the GTLV_CallBack tag }
  403.  
  404. { The different types of messages that a listview callback hook can see }
  405.  LV_DRAW     =  $202;    { draw yourself, with state }
  406.  
  407. { Possible return values from a callback hook }
  408.  LVCB_OK      = 0;         { callback understands this message type    }
  409.  LVCB_UNKNOWN = 1;         { callback does not understand this message }
  410.  
  411. { states for LVDrawMsg.lvdm_State }
  412.  LVR_NORMAL           = 0; { the usual                 }
  413.  LVR_SELECTED         = 1; { for selected gadgets      }
  414.  LVR_NORMALDISABLED   = 2;         { for disabled gadgets      }
  415.  LVR_SELECTEDDISABLED = 8;         { disabled and selected     }
  416.  
  417. Type
  418. { structure of LV_DRAW messages, object is a (struct Node *) }
  419.  LVDrawMsg = Record
  420.     lvdm_MethodID       : Integer;     { LV_DRAW                   }
  421.     lvdm_RastPort       : RastPortPtr; { where to render to        }
  422.     lvdm_DrawInfo       : DrawInfoPtr; { useful to have around     }
  423.     lvdm_Bounds         : Rectangle;   { limits of where to render }
  424.     lvdm_State          : Integer;     { how to render     }
  425.  end;
  426.  LVDrawMsgPtr = ^LVDrawMsg;
  427.  
  428. {------------------------------------------------------------------------}
  429.  
  430.  
  431. {
  432. --- functions in V36 OR higher (distributed as Release 2.0) ---
  433.  
  434.  Gadget Functions
  435. }
  436. FUNCTION CreateGadgetA(kind : Integer; gad, ng : GadgetPtr; taglist : Address) : GadgetPtr;
  437.  External;
  438.  
  439. PROCEDURE FreeGadgets(gad : GadgetPtr);
  440.  External;
  441.  
  442. PROCEDURE GT_SetGadgetAttrsA(gad : GadgetPtr; win : WindowPtr; req : RequesterPtr; taglist : Address);
  443.  External;
  444.  
  445. { Menu functions }
  446. FUNCTION CreateMenusA(nm : newmenuPtr; taglist : Address) : MenuPtr;
  447.  External;
  448.  
  449. PROCEDURE FreeMenus(m : menuPtr);
  450.  External;
  451.  
  452. FUNCTION LayoutMenuItemsA(firstitem : MenuItemPtr; vi : Address; taglist : Address) : Boolean;
  453.  External;
  454.  
  455. FUNCTION LayoutMenusA(firstmenu : MenuPtr; vi, taglist : Address) : Boolean;
  456.  External;
  457.  
  458. { Misc Event-Handling Functions }
  459. FUNCTION GT_GetIMsg(iport : MsgPortPtr) : IntuiMessagePtr;
  460.  External;
  461.  
  462. PROCEDURE GT_ReplyIMsg(imsg : IntuiMessagePtr);
  463.  External;
  464.  
  465. PROCEDURE GT_RefreshWindow(win : WindowPtr; req : RequesterPtr);
  466.  External;
  467.  
  468. PROCEDURE GT_BeginRefresh(win : WindowPtr);
  469.  External;
  470.  
  471. PROCEDURE GT_EndRefresh(win : WindowPtr; complete : Boolean);
  472.  External;
  473.  
  474. FUNCTION GT_FilterIMsg(imsg : IntuiMessagePtr) : IntuiMessagePtr;
  475.  External;
  476.  
  477. FUNCTION GT_PostFilterIMsg(imsg : IntuiMessagePtr) : IntuiMessagePtr;
  478.  External;
  479.  
  480. FUNCTION CreateContext( PtrToEmptyGadgetRecord : Address ) : GadgetPtr;
  481.  External;
  482.  
  483. { Rendering Functions }
  484. PROCEDURE DrawBevelBoxA(rport : RastPortPtr;left,top,width,height : Short; taglist : Address);
  485.  External;
  486.  
  487. { Visuals Functions }
  488. FUNCTION GetVisualInfoA(Scr : screenPtr; taglist : Address) : Address;
  489.  External;
  490.  
  491. PROCEDURE FreeVisualInfo(vi : Address);
  492.  External;
  493.  
  494.  
  495. {--- functions in V39 or higher (Release 3) ---}
  496.  
  497. FUNCTION GT_GetGadgetAttrsA(gad : GadgetPtr; Win : WindowPtr;
  498.                             req : RequesterPtr; taglist : Address) : Integer;
  499.     External;
  500.  
  501.